<template>
  <div>
    <div class="app-container app-bkColor" v-if="!show">
      <el-row :gutter="20">
        <el-col :span="19">
<!--          <HomeItem :type="1"></HomeItem>-->
            <Statistics></Statistics>
        </el-col>
        <el-col :span="5">
          <HomeItem :type="2"></HomeItem>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="24">
          <HomeItem :type="3"></HomeItem>
        </el-col>
      </el-row>
    </div>
    <div v-else style="padding: 20px; color: grey">
      录单系统首页
    </div>
  </div>
</template>

<script>
import HomeItem from '@/views/components/home/HomeItem.vue'
import Statistics from '@/views/components/home/Statistics.vue'
export default {
  name: "Index",
  components: { HomeItem, Statistics },
  data() {
    return {
      show: false
    }
  },
  created() {
    this.$store.getters.roles.forEach(item => {
      if ("gcsjs" === item) {
        this.show = true
      }
    })
  }
};
</script>

<style scoped lang="scss">
.app-bkColor{
  background-color: #F6F8FE;
}
</style>

